<template xmlns="http://www.farkhodkhaknazarov.com/ingestate/paramTemplate" id="configurations-params-template" name="Configurations Parameters Template" description="Configurations Parameters Template" version="0001">
	<fields>
		<choiceField id="configurationUpdateInterval" name="Configuration update interval (min)" description="Configuration update interval" type="SINGLE" access="READWRITE">
			<choiceValue label="15" value="0"/>
			<choiceValue label="20" value="1"/>
			<choiceValue label="25" value="2"/>
			<choiceValue label="30" value="3"/>
			<choiceValue label="35" value="4"/>
			<choiceValue label="40" value="5"/>
			<choiceValue label="45" value="6"/>
			<choiceValue label="50" value="7"/>
			<choiceValue label="55" value="8"/>
			<choiceValue label="60" value="9"/>
		</choiceField>
		<choiceField id="configurationInvocationInterval" name="Invocation interval (min)" description="Invocation interval" type="SINGLE" access="READWRITE">
			<choiceValue label="15" value="0"/>
			<choiceValue label="20" value="1"/>
			<choiceValue label="25" value="2"/>
			<choiceValue label="30" value="3"/>
			<choiceValue label="35" value="4"/>
			<choiceValue label="40" value="5"/>
			<choiceValue label="45" value="6"/>
			<choiceValue label="50" value="7"/>
			<choiceValue label="55" value="8"/>
			<choiceValue label="60" value="9"/>
		</choiceField>		
		<booleanField id="deleteAllConfigurations" name="Delete all configurations" description="All existing configurations will be deleted before download" access="READWRITE" trueValue="1" falseValue="0" defaultState="false"/>
		<structureField id="deleteConfigurations" name="Configurations for delete" description="List of configurations to be deleted" access="READWRITE" minRows="0" maxRows="65535" uniqueKeys="serialNumber" mandatory="false">
			<dataField id="serialNumber" name="Terminal signature" description="Terminal signature" type="alphanumeric" access="READWRITE" defaultValue="" />
		</structureField>
		<structureField id="availableConfigurations" name="Configurations table" description="List of availablle configurations" access="READWRITE" minRows="0" maxRows="65535" mandatory="false">
			<dataField id="serialNumber" name="Terminal signature" description="Terminal signature" type="alphanumeric" access="READWRITE" defaultValue="" mandatory="false"/>
			<dataField id="serverUrl" name="Request url of TEM server" description="Request url of TEM server" type="alphanumeric" access="READWRITE" defaultValue="" mandatory="false"/>
			<choiceField id="mutualTls" name="Mutual TLS option, turn on/off mutual TLS" description="Mutual TLS option, turn on/off mutual TLS" type="SINGLE" defaultValue="0" access="READWRITE">
				<choiceValue label="Turn on" value="0"/>
				<choiceValue label="Turn off" value="1"/>
			</choiceField>
			<choiceField id="keyOption" name="SSL option of mutual TLS" description="Affected only when mutual TLS option is true" type="SINGLE" defaultValue="0" access="READWRITE">
				<choiceValue label="Use vendor SSL" value="0"/>
				<choiceValue label="Use customer SSL" value="1"/>
			</choiceField>			
			<dataField id="clientKey" name="Client certificate" description="Client certificate key of mutual TLS, in PKCS12 format, affected only when mutual TLS option is true" type="alphanumeric" minLength="0" maxLength="25000" access="READWRITE" defaultValue="" mandatory="false"/>
			<dataField id="clientKeyPassword" name="Password client certificate" description="Password client certificate" type="alphanumeric" access="READWRITE" defaultValue="" mandatory="false"/>
			<dataField id="trustCa" name="Trusted CA certificate of single" description="Trusted CA certificate of single mutual TLS, in BKS format" type="alphanumeric" minLength="0" maxLength="25000" access="READWRITE" defaultValue="" mandatory="false"/>
			<dataField id="trustCaPassword" name="Password of trusted CA" description="Password of trusted CA" type="alphanumeric" access="READWRITE" defaultValue="" mandatory="false"/>
		</structureField>	
	</fields>
	<layout>
		<container name="Configurations" type="TAB" description="Configurations parameters">
			<fieldLayout fieldId="configurationUpdateInterval" type="DROPDOWN"/>
			<fieldLayout fieldId="configurationInvocationInterval" type="DROPDOWN"/>
			<separatorLayout text="Delete configurations"/>
			<fieldLayout fieldId="deleteAllConfigurations" type="CHECKBOX"/>
			<structureLayout fieldId="deleteConfigurations">
				<fieldLayout fieldId="serialNumber" type="TEXT"/>
			</structureLayout>		
			<separatorLayout text="Add configurations"/>
			<structureLayout fieldId="availableConfigurations">
				<fieldLayout fieldId="serialNumber" type="TEXT"/>
				<fieldLayout fieldId="serverUrl" type="TEXT"/>
				<fieldLayout fieldId="mutualTls" type="RADIOBUTTON"/>
				<fieldLayout fieldId="keyOption" type="RADIOBUTTON"/>
				<fieldLayout fieldId="clientKey" type="TEXTAREA" rows="10" wordWrap="true" upload="true"/>
				<fieldLayout fieldId="clientKeyPassword" type="MASKEDTEXT"/>
				<fieldLayout fieldId="trustCa" type="TEXTAREA" rows="10" wordWrap="true" upload="true"/>
				<fieldLayout fieldId="trustCaPassword" type="MASKEDTEXT"/>
			</structureLayout>		
		</container>
	</layout>
	<output>
		<xmlParamFile destination="configurations-params-template.xml">
			<freeOutput output="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;"/>
			<freeOutput output="&lt;Configurations&gt;"/>
			<fieldOutput fieldId="configurationUpdateInterval" fieldTag="configurationUpdateInterval"/>
			<fieldOutput fieldId="configurationInvocationInterval" fieldTag="configurationInvocationInterval"/>
			<fieldOutput fieldId="deleteAllConfigurations" fieldTag="deleteAllConfigurations"/>
			<structureOutput fieldId="deleteConfigurations" tagPerLine="true" fieldTag="deleteConfigurations">
				<fieldOutput fieldId="serialNumber" fieldTag="serialNumber"/>
			</structureOutput>			
			<structureOutput fieldId="availableConfigurations" tagPerLine="true" fieldTag="availableConfigurations">
				<fieldOutput fieldId="serialNumber" fieldTag="serialNumber"/>
				<fieldOutput fieldId="serverUrl" fieldTag="serverUrl"/>
				<fieldOutput fieldId="mutualTls" fieldTag="mutualTls"/>
				<fieldOutput fieldId="keyOption" fieldTag="keyOption"/>
				<fieldOutput fieldId="clientKey" fieldTag="clientKey"/>
				<fieldOutput fieldId="clientKeyPassword" fieldTag="clientKeyPassword"/>
				<fieldOutput fieldId="trustCa" fieldTag="trustCa"/>
				<fieldOutput fieldId="trustCaPassword" fieldTag="trustCaPassword"/>
			</structureOutput>
			<freeOutput output="&lt;/Configurations&gt;"/>
		</xmlParamFile>
	</output>
</template>